/*
 * @Author: levi7754 levi7754@163.com
 * @Date: 2025-10-11 18:25:41
 * @LastEditors: levi7754 levi7754@163.com
 * @LastEditTime: 2025-10-13 09:43:05
 * @FilePath: \udp-nature-mall\store\modules\user.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import { groupBy } from "xe-utils"
import { initDict, getUserAuth } from "@/api"
import { tenantId } from "@/utils"

export default {
  state: {
    current: "",
    currentTab: 0,
    from: "", // 来源，用于区分样品下单还是报价
    list: [],
    selecteds: [], // 客户筛选确认列表
    cartList: [],
    limit: {},
    balance: {},
    placeOrder: false
  },
  getters: {
  },
  mutations: {
    
  },
  actions: {
    // 信用额度
    async getLimit() {
      // const params = { customer_id: this.current.id }
      // const res = await customerApi.limit(params)
      // this.limit = res[0]
      // return res
    },
    // 客户余额
    // async getBalance() {
    //   const params = { customer_id: this.current.id }
    //   const res = await customerApi.balance(params)
    //   this.balance = res[0]
    //   return res
    // }
  },
};